import request from "@/utils/request.js";

/**
 * 创建充值订单
 */
export function createRecharge(data) {
	return request.get('recharge/create', data);
}

/**
 * 获取活动列表
 */
export function getActivity(data) {
	return request.get('recharge/getActivity', data);
}

/**
 * 支付充值订单
 */
export function rechargePay(data) {
	return request.get('recharge/pay', data);
}

/**
 * 获取充值记录
 */
export function queryRecharge(data, type) {
	if (type != 0) {
		data.rechargeStatus = type == 1 ? "WAIT_PAY" : "FINISH";
	} 
	return request.get('recharge/queryRecharge', data);
}